package com.xinruke.hostels.dailymanage.controller;

import com.xinruke.hostels.common.controller.BaseController;
import com.xinruke.hostels.common.vo.ResultVO;
import com.xinruke.hostels.dailymanage.interfaces.dto.inhotel.*;
import com.xinruke.hostels.dailymanage.service.MeetingRoomService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @ClassName MeetingRoomController
 * @CreateDate 2019/7/30
 * @Author chenry
 * @Version V1.0.0.0
 * @Decription 会议房间Controller
 */
@RestController
@RequestMapping("/meeting/room/")
@Api(tags = "会议入住")
@Slf4j
public class MeetingRoomController extends BaseController {

    @Autowired
    private MeetingRoomService meetingRoomService;

    @PostMapping("/inHotel")
    @ApiOperation("入住")
    public ResultVO<PersonalInHotelResultDTO> inHotel(@RequestBody @Valid PersonalInHotelDTO personalInHotelDTO) {
        ResultVO<PersonalInHotelResultDTO> resultVO = meetingRoomService.inHotel(personalInHotelDTO);
        return resultVO;
    }

    @PostMapping("/inHotelContinue")
    @ApiOperation("续住")
    public ResultVO<PersonalInHotelContinueResultDTO> inHotelContinue(@RequestBody @Valid PersonalInHotelContinueDTO personalInHotelContinueDTO) {
        ResultVO<PersonalInHotelContinueResultDTO> resultVO = ResultVO.fail();
        return resultVO;
    }

    @PostMapping("/inHotelChange")
    @ApiOperation("换房")
    public ResultVO<PersonalInHotelChangeResultDTO> inHotelChange(@RequestBody @Valid PersonalInHotelChangeDTO personalInHotelChangeDTO) {
        ResultVO<PersonalInHotelChangeResultDTO> resultVO = ResultVO.fail();
        return resultVO;
    }

}
